<?php 

/**
* 上传类
*/
class Upload 
{
	public $config = array(
		'path'=>'./Upload',
		'max_size'=>20000,
		'type'=>'jpg,png,gif'
	);
	public function __construct($config=array())
	{
		if(!empty($config)){
			$this->config = $config;
		}
	}
	
	public function save()
	{
		// $_FILES
		$this->checkSize();
		$this->checkType();
		$this->move();

	}
	private function checkSize()
	{
		# code...
	}

	private function checkType()
	{
		# code...
	}

	private function move()
	{
		# code...
	}
}



















 ?>